﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Search.aspx.cs" Inherits="DZH.TextSearch.Web.Search" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>智慧搜索</title>
    <script src="js/jquery-1.4.1-vsdoc.js" type="text/javascript"></script>
    <link href="css/main.css" rel="stylesheet" type="text/css" />
    <link href="css/search.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <div id="nav">
        欢迎您：毕海 先生 | <a href="http://www.gw.com.cn">返回大智慧首页</a>
    </div>
    <div id="search">
        <p>
            <img src="../img/logo2.gif" alt="logo" id="imgLogo" style="cursor: pointer" />
        </p>
        <p>
            <asp:DropDownList runat="server" ID="cboCategory">
                <asp:ListItem Value="0" Selected="True">全部</asp:ListItem>
                <asp:ListItem Value="1">新闻</asp:ListItem>
                <asp:ListItem Value="11 12">微博</asp:ListItem>
                <asp:ListItem Value="3">公告</asp:ListItem>
                <asp:ListItem Value="6">研报</asp:ListItem>
            </asp:DropDownList>
            <asp:TextBox ID="tbxSearch" runat="server"></asp:TextBox>
            <asp:Button ID="btnOK" runat="server" Text="智慧搜索" OnClick="btnOK_Click" />
        </p>
        <asp:Label runat="server" ID="labRecommand" Visible="false">您要搜的是不是：<font color="red">大智慧</font></asp:Label>
        <div id="dvError">
            请输入内容</div>
    </div>
    <div id="result">
        <asp:Repeater ID="rptResult" runat="server" OnItemDataBound="rptResult_ItemDataBound">
            <ItemTemplate>
                <div>
                    <h3>
                        <a href="#">
                            <asp:Literal ID="litTitle" runat="server">鹏博士电信传媒集团</asp:Literal>
                        </a>
                    </h3>
                    <div class="summary">
                        <asp:Literal ID="litContent" runat="server">
                    成都鹏博士电信传媒集团股份有限公司（原名成都鹏博士科技股份有限公司、成都工益冶金股份有限公司）成立于1985年1月，1994年1月3日，公司股票在上海证券 ...
                        </asp:Literal>
                    </div>
                    <div class="other">
                        <asp:Literal ID="litFrom" runat="server">
                    www.drpeng.com.cn
                        </asp:Literal>
                        &nbsp;&nbsp;
                        <asp:Literal ID="litDateTime" runat="server">
                    2013-4-15
                        </asp:Literal>
                    </div>
                    <div class="debug">
                        相似度：<asp:Literal ID="litScore" runat="server"></asp:Literal>
                    </div>
                </div>
                <br />
            </ItemTemplate>
        </asp:Repeater>
        <div id="footer">
            我们为您找到<asp:Literal runat="server" ID="litCount"></asp:Literal>条记录
        </div>
        <div id="pager">
            <asp:LinkButton runat="server" ID="lbtFirst" Text="<首页"></asp:LinkButton>
            <asp:PlaceHolder runat="server" ID="phPages">
                
                    <asp:LinkButton runat="server" ID="lbt_1" Text="1"></asp:LinkButton>
                
                    <asp:LinkButton runat="server" ID="lbt_2" Text="2"></asp:LinkButton>
               
                    <asp:LinkButton runat="server" ID="lbt_3" Text="3"></asp:LinkButton>
               
                    <asp:LinkButton runat="server" ID="lbt_4" Text="4"></asp:LinkButton>
               
                    <asp:LinkButton runat="server" ID="lbt_5" Text="5"></asp:LinkButton>
            </asp:PlaceHolder>
            <asp:LinkButton runat="server" ID="lbtLast" Text="尾页>"></asp:LinkButton>
        </div>
    </div>
    </form>
</body>
</html>
<script type="text/javascript" language="javascript">
    $(document).ready(function () {
        $("#btnOK").click(function () {
            var key = $.trim($("#tbxSearch").val());
            if (key == "") {
                $("#tbxSearch").focus();
                $("#dvError").show();
                return false;
            }

            var c2 = $("#cboCategory").val();
            var key = $.trim($("#tbxSearch").val());

            document.location = "./Search.aspx?key=" + key + "&c2=" + c2;

            return false;
        });

        $("#imgLogo").click(function () {
            document.location = "Default.aspx";
        });
    });
</script>
